NAME
  anago - Write or read NES cartridge data
SYNOPSIS
  anago d..|f.. scriptfile romfile ...
DESCRIPTION
  anago is a command-line utility for using the kazzo NES/Famicom 
  cartridge interface board. It can be used to either dump (d) 
  existing cartridges, or flash new data to programmable cartridges.
  
  NOTE: anago does not, at present, support RAM data read or write.
OPTIONS
  d..           Enables dump mode. The .. characters can be omitted 
                for default dump settings, or replaced with 2 or 4 
                to double or quadruple the size of the program or 
                character roms, if supported by the script.
  f..           Enables flash/program mode. The .. characters specify
                transfer modes (f, t, or b) for program or character roms.
                See the PROGRAM MODE section for more details.
  scriptfile    The programming or dumping script for the cartridge 
                type (i.e. the mapper used). Dump scripts end in .ad,
                while programming scripts end in .af.
  romfile       The ROM file to either program to cartridge, or 
                filename to save as when dumping.
DUMP MODE
  Dump mode is used to create ROM images from existing cartridges, if 
  d or D is specified as the operational mode for the program. In 
  addition to the common options above, one other option is available
  for this mode:
  
  mapper    Specifies/overwrites the stored mapper number. Usually 
            not needed, as the dump scripts will specify a suitable 
            number.
  
  Example for a UNROM cartridge:

    $ anago d unrom.ad unrom.nes
    
  Example for UOROM cartridge, which uses the UNROM script and the 
  double-size option:

    $ anago d2 unrom.ad unrom.nes

  Example for Metal Slader Glory / ELROM, with double the 
  normal character and program rom sizes of MMC5

    $ anago d22 mmc5.ad hal_4j.nes

  Example for Ys III / TKSROM, which is similar to MMC3 but needs its own mapper number

    $ anago d mmc3.ad vfr_q8_12.nes 118
PROGRAM MODE
  Program/flash mode is used to write ROM data to a flash memory 
  cartridge for use on an NES/Famicom or compatible. The following
  transfer modes are supported for either the program or character ROMs:
  f   anago transfers to all all memory managable by the mapper.
      This is fully-compatible with ROM images smaller than the
      manageable memory. This mode can be rather slow, however.
  t   anago transfers data to the top-half of the managed memory.
      This can work with program memory in several cases, and often works with character memory.
  b   anago transfers data to the bottom-half of the managed memory.

  If a capital F is used for the program mode, anago will compare 
  the data after the program completes.
  
  The program mode also has two additional parameters, 'cpu device' and 'ppu device', which specify which device is used to program the data and character roms, respectively. Refer to flashdevice.nut for supported devices.

  Example for transferring a 1M+1M image to mmc3 / TLROM.

    $ anago f mmc3.af tlrom_1M_1M.nes AM29F040B AM29F040B

  MMC3 can manage 4M+2M. Anago will therefore repeat each section four
  or two times, respectively, to fill the managable memory. To save
  time and store at the top of memory only, the following command could
  be used:

    $ anago ftt mmc3.af tlrom_1M_1M.nes AM29F040B AM29F040B

  For some image types, (e.g. Konami or Namcot), the program memory
  should be transferred to the bottom of the image instead:

    $ anago fbt mmc3.af tlrom_1M_1M.nes AM29F040B AM29F040B

  Incidentally, mmc3 is not compatible with Namcot 109 rom images. 
  A 109 board has hard-wired vram mirroring, mmc3 does not. 
  Related to this, be sure to use 109 instead if you have images for
  the Namcot 106, which doesn't actually exist.

  Example for transferring a UNROM (1M) image to UOROM.

    $ anago ft uorom.af unrom.nes AM29F040B

  If the character memory on the cartridge is actually RAM, there is no
  need to write a character device.
  
  The following example only transfers the character ROM for an mmc1/ SLROM cartridge (e.g. leave program rom untouched):

    $ anago ftt mmc1_slrom.af skrom.nes dummy AM29F040B
    $ anago fet mmc1_slrom.af skrom.nes AM29F040B AM29F040B
    
  Both options will have the same effect.
PATHS
  The tool will search two separate paths for any flash or dump scripts
  specified by the user, as well as for the primary .nut control files.
  $PREFIXDIR/share/anago    This path is used to store the default
                            script files and the main .nut control 
                            files. $PREFIXDIR is configured during CMAKE
                            and is usually /usr or /usr/local
  $HOME/.config/anago       This path can be created by the user and 
                            used to store scripts, if the user does
                            not have write-access to the default 
                            directory, or wishes to keep custom scripts
                            separate.
AUTHORS
  unagi development team, Ryan Armstrong
  
  See https://github.com/zerkerX/anago for source of this version,

  or https://osdn.net/projects/unagi/wiki/FrontPage for the 
  original unagi project
